feat: add docs site and authenticated Files gateway plans - #127
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This stack of pull requests is managed by Graphite. Learn more about stacking. |
d0616cd to
2d91ede
Compare
2d91ede to
292e661
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 292e661c03
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "head", | ||
| "list", | ||
| "search", | ||
| "signedUploadUrl", |
There was a problem hiding this comment.
Record completion for presigned uploads
When a caller uses the permitted signedUploadUrl operation, the subsequent upload goes directly to S3 and therefore produces no upload hook event; the proposed hook also has no signedUploadUrl case. Unless the caller happens to issue a later head, the object is successfully stored but never receives an asset row, violating the plan's core indexing acceptance criterion. Either exclude this operation from the initial surface or add a reliable completion/reconciliation mechanism.
Useful? React with 👍 / 👎.
| void ctx.var.db | ||
| .update(assets) | ||
| .set({ | ||
| status: "deleted", | ||
| updatedAt: new Date(), |
There was a problem hiding this comment.
Prevent upload writes from overtaking deletion
Because both handleUpload and this deletion update are launched fire-and-forget, an upload or head followed quickly by a delete can have the delete update execute first, match no row, and then have the delayed insert/upsert recreate the record as available. That leaves the index permanently claiming an object exists after S3 deleted it, so per-key mutations need ordering or deletion must persist a tombstone that a stale upload write cannot overwrite.
Useful? React with 👍 / 👎.
| ```text | ||
| apps/api/src/routes/files.ts | ||
| ``` |
There was a problem hiding this comment.
Update the files-client generator with the route move
When this move is implemented, turbo/generators/commands/files-client.ts will still require apps/api/src/routes/v1/files.ts, inspect the /v1 router for .route("/files", filesRoutes), and default clients to /v1/files. The generator will therefore reject every repository that follows this plan before producing a client; include its prerequisite checks, endpoint default, templates, and documentation in the route migration.
Useful? React with 👍 / 👎.

Adds two new planning documents and makes a minor spacing adjustment to the technology marquee.
Plan 16 — Documentation site outlines turning
apps/docsinto the public Init documentation site built on Astro Starlight. The plan establishesroot docs/as the single authored content source, loaded into Starlight via Astro'sglob()loader rather than the defaultdocsLoader(), so no content is copied or duplicated into the workspace. It defines which directories are published (consumer guides, architecture, Spanish localization) and which are excluded from public routes and search (agent instructions, template governance, and project ADRs). The plan covers the information architecture and sidebar structure, visual alignment withapps/webusing the same palette, typography, and sky accent, and completion of site metadata including canonical URL, favicon, Open Graph, sitemap, edit links, and a static 404 page. It also records the dual-role nature of the workspace—serving Init's own documentation in the template repository and a scaffold owner's documentation in a derived project—in a new ADR.Authenticated Files gateway and asset index proposes moving the Files SDK gateway from
/v1/filesto a top-level/filesroute to treat it as transport infrastructure alongside/auth,/trpc, and/workflows, reserving/v1/assetsfor a future application-owned interface. The plan describes wiring the existingrequireSessionmiddleware so the gateway reads the authenticated session from Hono's async context storage without a redundant auth lookup, and recording upload and deletion events in thestorage.assetstable directly inside anonActionhook using Drizzle inserts and updates. Hook failures are caught and logged without producing unhandled rejections. Copy and move operations, schema changes, transactional guarantees, and the/v1/assetsinterface are explicitly deferred.The marquee component receives a small vertical spacing correction, changing the label padding from
py-[0.7rem]topy-4and the scroll container bottom padding frompb-4topb-6.